package xyz.zdsoft.attendance_manage_module.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import xyz.zdsoft.attendance_manage_module.pojo.MyPage;

import javax.validation.constraints.Past;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 王林
 * @version 1.0
 * @date 2021-07-25 周日
 * @time 22:27
 * @description
 */
@Data
@ApiModel(value = "学生打卡记录")
public class PunchRecordVo extends MyPage implements Serializable {
    @ApiModelProperty(value = "学号")
    private String userNo;

    @ApiModelProperty(value = "学生姓名")
    private String studentName;

    @Past(message = "必须为一个过去的时间")
    @ApiModelProperty(value = "查询开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    @Past(message = "必须为一个过去的时间")
    @ApiModelProperty(value = "查询结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;
}
